<%@page import="org.apache.struts2.ServletActionContext"%>
<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<jsp:include page="header.jsp"/>

<%@taglib uri="/struts-tags" prefix="s"%>

<div id="content">
    <div class="container san-serif-font">
        <div class="login-head">
            <h3>Tạo tài khoản mới</h3>
        </div>
        <div class="login-body clearfix">
            <div class="register-region float-left">
                <h4>Đăng ký</h4>
                <div>Lần đầu ghé thăm trang web? Hãy đăng ký để có thể sử dụng đầy đủ các chức năng.</div>
                <s:form id="register-form" action="registerAction" method="POST" theme="simple">
                    <p>
                        <label class="label">Tên đăng nhập(<font color="red">*</font>)</label>
                    </p>
                    <p>
                        <s:textfield name="username" id="username" cssClass="input medium-input"/>
                    </p>
                    <div id="usernameInfo"></div>
                    <p>
                        <label class="label">Tên đầy đủ(<font color="red">*</font>)</label>
                    </p>
                    <p>
                        <s:textfield name="fullname" id="fullname" cssClass="input medium-input"/>
                    </p>
                    <div id="fullnameInfo"></div>
                    <p>
                        <label class="label">Mật khẩu(<font color="red">*</font>)</label>
                    </p>
                    <p>
                        <s:password name="password" id="password" cssClass="input medium-input"/>
                    </p>
                    <div id="passwordInfo"></div>
                    <p>
                        <label class="label">Xác nhận mật khẩu</label>
                    </p>
                    <p>
                        <s:password name="confirm" id="confirm" cssClass="input medium-input"/>
                    </p>
                    <div id="confirmInfo"></div>
                    <p>
                        <label class="label">Email(<font color="red">*</font>)</label>
                    </p>
                    <p>
                        <s:textfield name="email" id="email" cssClass="input medium-input"/>
                    </p>
                    <div id="emailInfo"></div>
                    <p>
                        <label class="label">Xác nhận captcha</label>
                    </p>
                    <p>
                        ${requestScope["CAPTCHA"]}
                    </p>
                    <div id="captchaInfo"></div>
                    <div class="text-right">
                        <s:submit id="register" value="Register" cssClass="big-nice-button"/>
                    </div>     
                </s:form>
            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>
<script type="text/javascript" src="js/ajaxCheckRegister.js"></script>
<script type="text/javascript" src="js/jsUtils.js"></script>
<script type="text/javascript">
    activeCurrentNav('registerNav');
</script>
<jsp:include page="footer.jsp"/>